#import "VirtuousJourneyController.h"
        
#import "VirtuousJourneyModel.h"
#import "VirtuousJourneyCell.h"
#import "Masonry.h"

@interface VirtuousJourneyController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *graciousCollectionView;
@property (nonatomic, strong) NSMutableArray *yawnArr;

@end

@implementation VirtuousJourneyController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self xenonInstinctConfigsui];
	[self oasisrequestData];
}


//: 懒加载数据模型数组
- (NSMutableArray *)yawnArr {
	if (!_yawnArr) {
		_yawnArr = [NSMutableArray array];
	}
	return _yawnArr;
}

- (void)xenonInstinctConfigsui {
    UICollectionViewFlowLayout *prismZest = [[UICollectionViewFlowLayout alloc] init];
    prismZest.minimumLineSpacing = 10;
    prismZest.minimumInteritemSpacing = 10;
    prismZest.itemSize = CGSizeMake(100, 100);
    prismZest.scrollDirection = UICollectionViewScrollDirectionVertical;
    
    self.graciousCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:prismZest];
    self.graciousCollectionView.backgroundColor = UIColor.clearColor;
    self.graciousCollectionView.delegate = self;
    self.graciousCollectionView.dataSource = self;
    self.graciousCollectionView.showsHorizontalScrollIndicator = NO;
    self.graciousCollectionView.showsVerticalScrollIndicator = NO;
    [self.graciousCollectionView registerClass:[VirtuousJourneyCell class] forCellWithReuseIdentifier:NSStringFromClass([VirtuousJourneyCell class])];
    
    [self.view addSubview:self.graciousCollectionView];
    [self.graciousCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}

//: 获取数据模型
- (void)oasisrequestData {
	
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.yawnArr.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    VirtuousJourneyCell *yield = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([VirtuousJourneyCell class]) forIndexPath:indexPath];
    return yield;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
